# Contributor: Alex Yam <alex@alexyam.com>
# Maintainer: Alex Yam <alex@alexyam.com>
pkgname=gf2x
pkgver=1.3.0
pkgrel=0
pkgdesc="library for multiplying polynomials over the binary field"
url="https://gitlab.inria.fr/gf2x/gf2x/"
arch="all"
license="GPL-3.0-or-later"
makedepends="autoconf automake libtool"
subpackages="$pkgname-dev"
source="https://gitlab.inria.fr/gf2x/gf2x/-/archive/gf2x-$pkgver/gf2x-gf2x-$pkgver.tar.bz2"
builddir="$srcdir/$pkgname-$pkgname-$pkgver"

prepare() {
	default_prepare
	update_config_guess
	update_config_sub
	autoreconf -i
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--enable-fft-interface
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="2872d8ddeb1fd3966f8711573d6c090975fcd9acfa302f7537ebfa3350e83af224bfd18a33ea1106d81ab900c96413e413c04ba506d8bf928bb92b670c24d857  gf2x-gf2x-1.3.0.tar.bz2"
